home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 May / PC Direct CD-ROM (May 1995).ISO / ipe / manuals / lc30 / lsc4.txt < prev    next >
Encoding:
Text File  |  1994-06-29  |  80.5 KB  |  1,941 lines

  1. LAN Support Center   
  2.  
  3. Copyright 1994, McAfee, Inc.  All rights reserved.  
  4.   
  5. =========================
  6. Part Two: Crystal Reports  
  7. =========================
  8.  
  9. 11.0  Practical Crystal Reports  
  10.   
  11. This chapter contains a number of topics on the practical aspects of using   
  12. Crystal Reports to solve typical reporting problems.  
  13.   
  14.   
  15. 11.1  Practical Crystal Reports  
  16.   
  17. This chapter contains a number of topics on the practical aspects of   
  18. using Crystal Reports to solve typical reporting problems. The topics   
  19. are broken down into the following groups:  
  20.   
  21.   
  22. Creating a report               Topics on a variety of report creation skills.  
  23.   
  24. Manipulating text and data      Topics that show you how to manipulate (copy,   
  25.                 delete, move, etc.) text and data on your   
  26.                 report.  
  27.   
  28. Working with graphics and       Topics that show you how to size, scale,   
  29. graphic enhancements            crop, and fine tune the placement of     
  30.                 bit-mapped graphics, and how to create, size,   
  31.                 and position lines, boxes, and tables on   
  32.                 your report.  
  33.   
  34.   
  35. 11.2  Creating a Report  
  36.   
  37. This section leads you through the following report creation topics:  
  38.   
  39. o  Selecting a database  
  40. o  Selecting additional databases  
  41. o  Linking the databases   
  42. o  Understanding the invisible grid   
  43. o  Creating margins  
  44. o  Inserting fields  
  45. o  Selecting fields to move, format, etc.  
  46. o  Spacing fields  
  47. o  Inserting text   
  48. o  Selecting text (to delete, change the font, etc.)  
  49. o  Aligning text with fields  
  50. o  Inserting blank lines  
  51. o  Deleting blank lines   
  52. o  Changing field and text fonts   
  53. o  Highlighting fields with borders and drop shadows   
  54. o  Centering text, field values  
  55. o  Inserting page headers and footers   
  56. o  Inserting page numbers and other special fields   
  57. o  Grouping data  
  58. o  Summarizing grouped data  
  59. o  Creating group headers   
  60. o  Sorting your data   
  61. o  Hiding parts of the report when printing   
  62. o  Selecting records and groups you want included on your report.   
  63. o  Selecting page orientation and paper size  
  64.   
  65. 11.2.1  Selecting a Database  
  66.   
  67. Begin the report creation process by selecting (activating) a database.   
  68. Once activated, the database serves as a source from which you can select   
  69. fields to appear on your report and to be included in report formulas.  
  70.   
  71. Select a database using the New Report command on the File menu.   
  72.   
  73. 11.2.2  Selecting Additional Databases  
  74.   
  75. Crystal Reports allows you to draw data from multiple databases for use in   
  76. a single report. Select the first database you want to use from the Choose   
  77. Database File dialog box that appears when you select New Report from the   
  78. File Menu. Select the second and each additional database using the Add File   
  79. to Report command on the Database menu.   
  80.   
  81. 11.2.3  Linking the Databases  
  82.   
  83. You link databases so that records from one database will match up with   
  84. records from another. For example, if you activate a Customer database and   
  85. an Order database, you link the databases so that orders in the Order   
  86. database can be matched up with the customers who placed the orders (from   
  87. the Customer database).   
  88.   
  89. Links are fields that are common to the two databases. The fields don't   
  90. have to have the same name; but they must have the same structure (size,   
  91. data type), and contain the same kind of data.  
  92.   
  93. o  When you activate additional databases using the Database|Add File to   
  94. Report command, Crystal Reports takes you directly to the Define Link dialog   
  95. box. You use this dialog box to establish the link between the database   
  96. you are activating and a database which is already active.  
  97.   
  98. o  If you later wish to create new links, or update or delete existing   
  99. links, you use the Database|Links command which takes you to the Links   
  100. dialog box. Use this dialog box for a variety of linking activities.  
  101.   
  102. 11.2.4  Understanding the Invisible Grid  
  103.   
  104. The Report Editor looks very freeform. It looks like you can place anything   
  105. anywhere and hope for good results. But that is not the case. The Editor   
  106. contains an invisible grid which directly affects the placement of data   
  107. fields and text fields.   
  108.   
  109. Think of the grid as a series of row and column coordinates. Crystal Reports   
  110. allows you to place fields and text only at these coordinates, not between   
  111. them. In this way it makes it very easy for you to place and space data on   
  112. your report, and to align text and fields as needed. If you attempt to   
  113. place a report element between grid coordinates, Crystal Reports "snaps" the   
  114. element to the grid (i.e., it moves the element automatically to the   
  115. nearest coordinate).  
  116.   
  117. o  When you place a data field in the Report Editor, Crystal Reports   
  118. "snaps" it to the nearest coordinate. Use the arrow keys or the mouse   
  119. to move the fields once they have been placed.  
  120.   
  121.     - When you use the arrow keys to move the field, each time you   
  122.     press the arrow the field moves one grid position.  
  123.     - When you use the mouse to drag the field to a new location,   
  124.     Crystal Reports "snaps" the field to the nearest coordinate as the   
  125.     field moves.  
  126.   
  127. o  When you type text in the Report Editor, Crystal Reports always begins   
  128. the text at a grid coordinate.  
  129.   
  130.     - Use the Tab key to move the text; each time you press the Tab   
  131.     key the text moves six grid positions  
  132.   
  133. NOTE:  Crystal Reports uses a four pixel horizontal grid and a vertical   
  134. grid that is variable, based on the line height assigned to the largest   
  135. font used within a report section.  
  136.   
  137. 11.2.5  Creating Margins  
  138.   
  139. Set margins in Crystal Reports using the Print|Set Printer Margins   
  140. command.   
  141.   
  142. o  Crystal Reports uses a dashed line to display your margins in the   
  143. Report Editor and Label Editor.  
  144.   
  145. o  The displayed margins are active: they define the outer printing   
  146. limits of the report or label. Crystal Reports will not allow you to place   
  147. or move a field or text so it extends beyond the margins.    
  148.   
  149. o  The numeric margin settings appear in both the Mailing Labels dialog   
  150. box and in the Printer Margins dialog box.  
  151.   
  152. o  When you create a new report, Crystal Reports uses the non-printing   
  153. areas established for your printer as default margins. For example, if   
  154. your printer specifications indicate that the left quarter inch of a   
  155. page is a non-printing area, Crystal Reports sets the default left margin   
  156. at .25 inches. While you can set margins that fall inside the non-printing   
  157. areas, parts of your report may be clipped off if you do.  
  158.   
  159. o  All margins are calculated from the paper edge. Thus, a left margin   
  160. of .25 inches causes the printing to start exactly one quarter inch in   
  161. from the edge of the paper.  
  162.   
  163. 11.2.6  Inserting Fields  
  164.   
  165. Insert fields on your report using the Database Field command on the   
  166. Insert menu.   
  167.   
  168. 11.2.7  Selecting Fields to Move, Format, etc.  
  169.   
  170. To do many things with a field (change the font, move it, etc.), first you   
  171. must to select it. Select means to point to the element with the mouse   
  172. and then to click the left mouse button to choose the element as the   
  173. object of the next menu selection. For example, to change font size, you   
  174. first select the element for which you want to change the font size. Then   
  175. you select the Font option from the Format menu (or Change Font from the   
  176. right mouse button menu) to select the new font size. The new font size   
  177. applies only to the field you selected.  
  178.   
  179. When you select a field, black handles appear on the field box. These   
  180. handles indicate that the field is selected, and therefore active.   
  181.   
  182. 11.2.8  Selecting Multiple Fields at One Time  
  183.   
  184. To select multiple fields at one time, press the Shift key and, while   
  185. keeping it depressed, click the various fields you want to select. Handles   
  186. will appear on each field selected. You can then move or delete the fields   
  187. as a group. You can also change the font or formatting or add borders   
  188. for all selected fields.  
  189.   
  190. 11.2.9  Spacing Fields  
  191.   
  192. Set spacing between data fields by placing the fields where you want   
  193. them in the Report Editor (using the mouse or Arrow keys), checking your   
  194. spacing using the Print|Print to Window command, and then fine-tuning the   
  195. spacing, again in the Report Editor.  
  196.   
  197. 11.2.10  Spacing Considerations  
  198.   
  199. The following items that can affect column spacing:  
  200.   
  201. o  Field size - The amount of space allotted for a field may be much greater   
  202. than the size of the value that appears in the field.   
  203.   
  204.     - In a number or dollar amount field (which is right justified   
  205.     by default), this can create a large number of leading blank   
  206.     spaces which can impact field spacing.   
  207.     - In all other fields (which are left justified by default), it   
  208.     can create a large number of trailing blank spaces which can   
  209.     impact field spacing.   
  210.   
  211. You can reduce the amount of space allotted for a field by selecting the   
  212. field and then resizing it using the mouse or a Shift-Left Arrow or   
  213. Shift-Right Arrow key combination.  
  214.   
  215. o  Mouse - To reduce the size of a field in the Report Editor using the   
  216. mouse, select the field and then drag either of the handles to make the   
  217. field box smaller.  
  218.   
  219. o  Shift-Left Arrow key - To reduce the size of a field in the Report   
  220. Editor using the Shift-Arrow key combination, select the field, press the   
  221. Shift key, and, while keeping it depressed, press the Left Arrow key enough   
  222. times to reduce the field to the desired size.  
  223.   
  224. NOTE:  If you have set up a data block of fields in the Report Editor   
  225. (i.e., Customer/Address/City in a customer list report), you can resize   
  226. all of the fields simultaneously once. First, click each of the fields while   
  227. holding down the Shift key. Then resize the fields by dragging on one of the   
  228. sizing handles from any of the selected fields (using the mouse) or by using   
  229. the Shift-Arrow key combination.  
  230.   
  231. o  Alignment - Number and dollar amount fields are right justified by   
  232. default; all other data types are left justified. A right aligned field   
  233. following a left aligned field may appear to be spaced properly in the Report   
  234. Editor. You may need to fine tune the spacing, however, once you review   
  235. the report in the Print Window.  
  236.   
  237. 11.2.11  Inserting Text (Titles, Labels, etc.)  
  238.   
  239. You can add text to your report by typing it at the insertion point and   
  240. then moving it into place or, by using the Insert|Text Field command.    
  241.   
  242. Use the following procedure to insert text directly on your report:  
  243.   
  244. 1.  Move the I-beam cursor to the line on which you wish to enter text.   
  245.   
  246. 2.  Click the left mouse button to set the insertion point at the left   
  247.     margin of the Report Editor.  
  248.   
  249. 3.  Type in your text.  
  250.   
  251. 4.  Move the I-beam cursor in front of the text, click to set the insertion   
  252.     point and push the text into position using the Tab key.   
  253.   
  254. Use the following procedure to insert text using a text field:  
  255.   
  256. 1.  Select Insert|Text Field.   
  257.       
  258.     The Edit Text Field dialog box appears.   
  259.   
  260. 2.  Enter your text in the Enter Text edit box, and click OK when finished.   
  261.       
  262.     A rectangular placement cursor appears and changes into a field box   
  263.     when it enters the Report Editor.   
  264.   
  265. 3.  Position the field box where you want the text field to appear and   
  266.     click the left mouse button to place it.  
  267.   
  268. NOTE:  By default, Crystal Reports automatically places a title in the   
  269. Page Header section to identify each field or formula field you insert in   
  270. your report. These titles are simply text fields. As such, they can be   
  271. moved, formatted, deleted, resized, or edited to change the text.  
  272.   
  273. o  For fields, the default title is the name of the field.  
  274. o  For formulas, the default title is the name of the formula.  
  275.   
  276. The left edge of each title aligns with the left edge of the field   
  277. it identifies.  Automatic titles can be toggled off and on via the Insert   
  278. Detail Field Titles option in the Options dialog box.  
  279.   
  280. 11.2.12  Selecting Text (To Delete, Change the Font, etc.)  
  281.   
  282. To do many things with text (change the font, delete it, etc.), first you   
  283. must to select it. Select means to highlight the text by dragging the   
  284. I-beam cursor over it while holding down the left mouse button. Your next   
  285. action (changing the font, selecting Edit|Cut, etc.) acts upon the text   
  286. selected.  
  287.   
  288. NOTE:  When text is in a text field, you select it as you would select   
  289. any field.  
  290.   
  291. 11.2.13  Aligning Text with Fields  
  292.   
  293. Often in reporting, you may find yourself wanting to align text with column   
  294. data (that you entered as fields or formula fields). To do this, place   
  295. your fields, type your text, and then move the text into position using the   
  296. Tab key. It is important to understand why you use the Tab key to perform   
  297. this function and not the Space Bar. Spaces on the screen take up a   
  298. different amount of space than spaces on the printer. Thus, what looks like   
  299. it is aligned on screen (using the Space Bar) may not be aligned when you   
  300. print. If text and fields are aligned to a given tab stop on screen, however,   
  301. the elements will also be aligned when you print. Since both elements are   
  302. aligned to the same tab stop, a tab expansion can affect only the absolute   
  303. position of the elements on a page, not their alignment relative to each   
  304. other.   
  305.   
  306. To align text with fields, you move the text, the field, or both.   
  307.   
  308. o  Move the text with the Tab key. Each time you press the Tab key the   
  309. text moves six grid positions.   
  310.   
  311. o  Move the fields with the Arrow keys. Each time you press one of the   
  312. Arrow keys, the text moves one grid position.   
  313.   
  314. NOTES:  a - If you want to center the text over a field, or right or   
  315. left align it, you can type the text into a text field and use the   
  316. Format|Field alignment commands to set the alignment of the text within   
  317. the text field.   
  318.     b - Text can be moved right and left (with the Tab and Backspace 
  319. keys) as can fields (with the Right Arrow and Left Arrow keys). By moving 
  320. text and fields in concert, you should be able to get good alignment easily.
  321.     c - To align field titles with fields, working from left to right is 
  322. best. Make certain the first title is aligned with its field, then align the   
  323. second title with its field, etc. Aligning, in this case, consists of   
  324. aligning the left edge of the title with the left edge of the field.  
  325.     d - For the best (and easiest) alignment of text and field data, 
  326. enter your text elements as text fields using the Insert|Text Field command
  327. (instead of entering the text directly onto the report).  
  328.   
  329. 11.2.14  Inserting Blank Lines  
  330.   
  331. To insert a blank line, move the I-beam cursor to the section in which   
  332. you want to enter the blank line, click the left mouse button to set the   
  333. insertion point, and press Enter one time for each blank line you want to   
  334. insert.  
  335.   
  336. Considerations:  
  337.   
  338. o  If you place the insertion point before text and then press Enter,   
  339. the blank lines will appear above the text.  
  340.   
  341. o  If you place the insertion point after text and then press Enter,   
  342. the blank lines will appear below the text.  
  343.   
  344. o  If you place the insertion point before or after a field and then   
  345. press Enter, the blank lines will always appear below the field. If you   
  346. want to insert blank lines above the field, insert the number of blanks   
  347. you need below the field as indicated, and then move the field down to   
  348. the bottom blank line you have just created.  
  349.   
  350. NOTE:  You can also add blank lines by dragging the section boundary to   
  351. increase section size.   
  352.   
  353. 11.2.15  Deleting Blank Lines  
  354.   
  355. By default the Report Editor allots three lines for the Page Header section   
  356. and three lines for the Page Footer section of your report. The defaults   
  357. may allot more lines than you need for those items on your report.    
  358.   
  359. Additionally, you may expand a section on your report by a random number   
  360. of lines prior to inserting text and data, just to make sure you have   
  361. enough room for your entries. You may find that you have added more lines   
  362. than necessary.  
  363.   
  364. Printing the report without first deleting the unneeded blank lines can   
  365. leave gaps in your report that make the report less attractive visually   
  366. and more difficult to read.  
  367.   
  368. To delete unneeded blank lines:  
  369.   
  370. o  If an entire section is blank (i.e., if you aren't putting anything   
  371. into the Page Footer section of your report), you can eliminate the   
  372. allotted blank lines by eliminating the entire report section via the Hide   
  373. Section option of the Format Section command.  
  374.   
  375. o  If you have text and/or data in a section and just want to remove the   
  376. extraneous blank lines, click the I-beam cursor on the blank line you want   
  377. to delete. This sets the insertion point. Once the insertion point is set,   
  378. press the Backspace key (the key that deletes the previous character);   
  379. Crystal Reports deletes the line on which the insertion point is set.  
  380.   
  381. NOTE:  You can also delete blank lines by dragging the section boundary to   
  382. decrease section size.   
  383.   
  384. 11.2.16  Changing Field and Text Fonts  
  385.   
  386. You can change fonts quickly for any field value or text string in your   
  387. report using the Font dialog box.  
  388.   
  389. Use the following procedure to change fonts for a field value.  
  390.   
  391. 1.  Select the field(s) for which you want to change the font.  
  392.   
  393.     o To select a single field, click the field.  
  394.     o To select multiple fields, hold the Shift key down while you   
  395.     click the fields.  
  396.   
  397.     Handles appear on the selected field(s).  
  398.   
  399. 2.  Select Format|Font or click the right mouse button and select Change   
  400.     Font from the pop-up menu.   
  401.   
  402.     The Font dialog box appears.  
  403.   
  404. 3.  Make the font, style, size, color, and/or effects changes you want   
  405.     and click OK when finished.  
  406.   
  407. Use the following procedure to change fonts for a text string:  
  408.   
  409. 1.  With the left mouse button depressed, drag the I-beam cursor over the   
  410.     text of interest to select it.  
  411.   
  412. 2.  Select Format|Font or click the right mouse button and select Change   
  413.     Font from the pop-up menu.   
  414.       
  415.     The Font dialog box appears.  
  416.   
  417. 3.  Make the font, style, size, color, and/or effects changes you want and   
  418.     click OK when finished.  
  419.   
  420. 11.2.17  Highlighting Fields with Borders and Drop Shadows  
  421.   
  422. Crystal Reports makes it easy for you to highlight your data with borders   
  423. and drop shadows, and color.   
  424.   
  425. Use the following procedure to create borders, drop shadows, and add field   
  426. color:  
  427.   
  428. 1.  Select the field(s) you want to highlight.  
  429.   
  430.     o  To select a single field, click the field.  
  431.     o  To select multiple fields, hold the Shift key down while you   
  432.     click the fields.   
  433.       
  434.     Handles appear on the selected field(s).  
  435.   
  436. 2.  Select Format|Border and Colors or click the right mouse button and   
  437.     select Change Border and Colors from the pop-up menu.   
  438.   
  439.     The Format Border and Colors dialog box appears.  
  440.   
  441. 3.  Set up the text color, fill (field color), border, and drop shadow you   
  442.     want.  
  443.   
  444. 4.  Click OK when finished to return to the Report Editor.   
  445.   
  446.     The selected fields will be highlighted to your specifications.  
  447.   
  448. NOTE:  If you selected multiple fields, the same highlights will be applied   
  449. to all fields. If you want to highlight different fields differently, you   
  450. must select and highlight each unique field individually.  
  451.   
  452. 11.2.18  Centering Text, Field Values  
  453.   
  454. To center text and field values, you use the Crystal Reports' alignment   
  455. command.   
  456.   
  457. Use the following procedure to center text under a title, over the body of   
  458. the report, etc.  
  459.   
  460. 1.  Select Insert|Text Field and create a text field that contains the   
  461.     text you want.  
  462.   
  463. 2.  Place the text field in the approximate position you want it to appear   
  464.     on the report.   
  465.   
  466. 3.  Change the font, font size, and font style for the text field if you   
  467.     wish.   
  468.   
  469. 4.  Resize the text field box so it matches the margins within which you   
  470.     wish to center the text.   
  471.   
  472.     For example, if you want to center text beneath a report title, expand   
  473.     the field box so it's the same size as the report title (or report   
  474.     title field box). If you want to center a header entry over the body of   
  475.     the report, expand the header entry field box so it's the same width as   
  476.     the data in your report.   
  477.   
  478. 5.  Select Format|Field, and then select centered from the Alignment box in   
  479.     the Field Format dialog box when it appears.   
  480.   
  481. 6.  Select OK when finished; Crystal Reports centers your text within the   
  482.     expanded field box.   
  483.   
  484. Use the following procedure to center a field value within the space   
  485. allotted for the field:  
  486.   
  487. 1.  Select the field whose value you want to center.  
  488.   
  489. 2.  Change the font, font size, and font style for the field if you wish.   
  490.   
  491. 3.  Select Format|Field, and then select centered from the Alignment box   
  492.     in the Field Format dialog box when it appears.   
  493.   
  494. 4.  Select OK when finished; Crystal Reports centers the field value within   
  495.     the space allotted for the field.  
  496.   
  497. 11.2.19  Inserting Page Headers and Footers  
  498.   
  499. In many cases, you may want to include information at the top and bottom   
  500. of each page of your report.  
  501.   
  502. o  At the top of the report (page header) you may want to include such   
  503. things as the report title, the report date, the range of dates covered by   
  504. the report, etc.  
  505.   
  506. o  At the bottom of the report (page footer) you may want to print the page   
  507. number, the author's name, "Confidential," etc.  
  508.   
  509. Crystal Reports makes it easy for you to include such header and footer   
  510. information.  
  511.   
  512. 11.2.20  To Insert Page Headers and Footers  
  513.   
  514. You insert page headers and footers by placing the desired information in   
  515. the appropriate section of the report editor.  
  516.   
  517. o  header information goes in the Page header section  
  518. o  footer information goes in the Page footer section  
  519. o  Any information you place in these sections prints on each page of the   
  520. report (unless you take special steps to prevent some printing).  
  521. o  You can use text, fields, or formulas in these sections just as you can   
  522. in the Details section.  
  523.   
  524. 11.2.21 To Format Page Headers and Footers  
  525.   
  526. You can format each element in a header or footer in the same way you   
  527. would format that element if it appeared in the details section:  
  528.   
  529. o  you can change the font for text, fields, or formulas (see Format|Font),  
  530.   
  531. o  you can center the values horizontally on the page, center them over   
  532. your report data, or align them flush left, centered, or flush right   
  533. within the space allotted for them,  
  534.   
  535. o  you can change the way dates, numbers, and currency appear when they   
  536. print, (see Format|Field) and  
  537.   
  538. o  you can suppress any blank lines that occur in the section (see   
  539. Format|Section).  
  540.   
  541. To format a header or footer element, select the element and then select   
  542. the formatting option of interest.  
  543.   
  544. 11.2.22  Inserting Page Numbers and Other Special Fields  
  545.   
  546. Crystal Reports lets you insert special fields in your reports (in addition   
  547. to the data fields you draw from databases). These special fields allow you   
  548. to insert dates, page numbers, and group and record numbers in your report.  
  549.   
  550. Print Date Field        Use Insert|Print Date Field to insert a field   
  551.             that prints whatever is the current date when   
  552.             the report prints.  
  553.   
  554. Page Number Field       Use Insert|Page Number Field to insert a field   
  555.             that prints the current page number.  
  556.   
  557. Record Number Field     Use Insert|Record Number Field to have Crystal   
  558.             Reports number each record printed in the Details   
  559.             section of your report.  
  560.   
  561. Group Number Field      Use Insert|Group Number Field to have Crystal   
  562.             Reports number each group in your report.  
  563.   
  564.   
  565. When you select any of these special fields, a rectangular placement cursor   
  566. appears. Move the cursor to the point where you want to insert the field and   
  567. click the left mouse button to place it.  
  568.   
  569. 11.2.23  Grouping Data  
  570.   
  571. Grouping data means breaking your data into meaningful groups before it   
  572. appears on your report. Crystal Reports makes it easy:  
  573.   
  574. o  to group your data, and   
  575. o  to evaluate or perform calculations on the data in each group should   
  576. you so wish.  
  577.   
  578. 11.2.24  Simple Grouping  
  579.   
  580. Simple grouping means breaking the data into groups without performing any   
  581. additional action (totaling, averaging, etc.) on the grouped data.  
  582.   
  583. o  On a customer list, for example, you may want to group your data by   
  584. state for use by your customer service or telemarketing personnel. Crystal   
  585. Reports can quickly organize your data into state groups so that each group   
  586. contains only customers from a single state.   
  587.   
  588. o  On a sales report you may want to group data by salesrep (each group   
  589. containing only sales made by a single salesrep) or by customer (each group   
  590. containing only sales made to a single customer). Crystal Reports   
  591. gives you the flexibility to group data in a variety of ways.  
  592.   
  593. NOTE:  Whenever Crystal Reports groups data, it first sorts the data, and   
  594. then it breaks the sorted data into groups. For example, if you want to   
  595. group a customer list by state, Crystal Reports first sorts the data by   
  596. state. Then it begins a new group whenever the state changes. The following   
  597. data shows that process.  
  598.   
  599. If all you want to do is group your data, you can do this easily with   
  600. Crystal Reports using the Insert|Group command.  
  601.   
  602. Use the following procedure to do simple grouping:  
  603.   
  604. 1.  Select the field you want to group.   
  605.   
  606.     For example:  
  607.   
  608.     - if you want to group a customer list by state, select the field   
  609.     that contains the company name, or   
  610.     - if you want to group an orders report by customer, select the   
  611.     field that contains the order amount.  
  612.   
  613. 2.  Select Insert|Group Section. The Insert Group Section dialog box appears.  
  614.   
  615. 3.  In the top scroll box, select the field that you want to trigger a   
  616.     grouping, whenever its value changes.   
  617.   
  618.     For example:  
  619.   
  620.     - if you want to group a customer list by state, select the state   
  621.     field, or   
  622.     - if you want to group an orders report by customer, select the   
  623.     field that contains the customer name or customer number.  
  624.   
  625. 4.  In the second scroll box, select the sort direction (in ascending order   
  626.     = A to Z, 0 to 9, in descending order = Z to A, 9 to 0).  
  627.   
  628. 5.  If you selected a date or Boolean field in the top scroll box, a third   
  629.     scroll box appears near the bottom of the dialog box. In this   
  630.     scroll box, select the date or Boolean condition that finalizes your   
  631.     subtotal specification.  
  632.   
  633. 6.  Select OK when finished. Crystal Reports sorts the data and then breaks   
  634.     it into groups according to your specifications.  
  635.   
  636. NOTE:  You can tell that the data is grouped because two new sections   
  637. appear in the Report Editor bracketing the Details section.   
  638.   
  639. 11.2.25  Nesting Groups  
  640.   
  641. You may also want to nest groups of data: group data within a group.   
  642. For example, on a customer list, you may want to group your data by state,   
  643. and then, within each state group, break the data down further, by city.   
  644.   
  645. Crystal Reports lets you do this easily: you use the Insert|Group Section   
  646. command two times, first to set up the state group and then to set up the   
  647. city group.  
  648.   
  649. NOTE:  You can add additional nesting levels as needed; there is no   
  650. practical limit to how many nesting levels you can set up.  
  651.   
  652. Use the following procedure to group using nesting groups.  
  653.   
  654. 1.  Select the field you want to group.   
  655.   
  656.     For example:  
  657.   
  658.     - if you want to group a customer list by state and then, within   
  659.     each state group, group the list by city, select the field that   
  660.     contains the company name, or   
  661.     - if you want to group an orders report by customer and then,   
  662.     within each customer group, group the list by date, select the   
  663.     field that contains the order amount.  
  664.   
  665. 2.  Select Insert|Group Section.   
  666.   
  667.     The Insert Group Section dialog box appears.  
  668.   
  669. 3.  In the top scroll box, select the field that you want to trigger a   
  670.     grouping, whenever its value changes.   
  671.   
  672.     For example:  
  673.   
  674.     - if you want to group a customer list by state and then by city,   
  675.     select the state field, or   
  676.     - if you want to group an orders report by customer and then by   
  677.     date, select the field that contains the customer name or customer   
  678.     number.  
  679.   
  680. 4.  In the second scroll box, select the sort direction (in ascending order   
  681.     = A to Z, 0 to 9, in descending order = Z to A, 9 to 0)  
  682.   
  683. 5.  If you selected a date or Boolean field in the top scroll box, a third   
  684.     scroll box appears near the bottom of the dialog box. In this   
  685.     scroll box, select the date or Boolean condition that finalizes your   
  686.     subtotal specification.  
  687.   
  688. 6.  Select OK when finished.   
  689.   
  690.     Crystal Reports groups the data according to the first set of   
  691.     specifications.   
  692.   
  693. 7.  Select the same field you selected in Step 1.  
  694.   
  695. 8.  Select Insert|Group Section again.   
  696.       
  697.     The Insert Group Section dialog box appears.  
  698.   
  699. 9.  This time select the field you want to trigger the second group (the   
  700.     group within the group) whenever its value changes.   
  701.   
  702.     For example:  
  703.   
  704.     - if you want to group a customer list by state and then by city,   
  705.     select the city field, or   
  706.     - if you want to group an orders report by customer and then by   
  707.     date, select the date field.  
  708.   
  709. 10. Select the sort direction (ascending = A to Z, 0 to 9, descending =   
  710.     Z to A, 9 to 0).  
  711.   
  712. 11. Select OK when finished. Crystal Reports groups the data, this time   
  713.     using both sets of specifications.   
  714.   
  715. 12. Repeat Steps 6 to 10 for each additional group you want to set up.  
  716.   
  717. 11.2.26  Summarizing Grouped Data  
  718.   
  719. Sometimes you may want to go beyond mere grouping of data. You may want to   
  720. first group the data and then evaluate or perform calculations on the data   
  721. in each group. You may want to sum, average, or count the values, calculate   
  722. the variance or standard deviation of the values, or determine the highest   
  723. (maximum) or lowest (minimum) value in each group.  
  724.   
  725. o  You can sum the data using the Insert|Subtotal or Insert|Summary commands.   
  726.   
  727. o  You can sum, average, count, calculate the variance or standard   
  728. deviation, or determine the maximum or minimum values using the   
  729. Insert|Summary commands.  
  730.   
  731. NOTE:  Not all summary options are available for every data type. For   
  732. example, you cannot sum or average string fields.  
  733.   
  734. 11.2.27  Grouping and Summarizing Grouped Data  
  735.   
  736. 1.  Select the field you want to group.   
  737.   
  738.     For example:  
  739.   
  740.     - if you want to group a customer list by state and then count the   
  741.     number of values in each group, select the field that contains   
  742.     the company name, or   
  743.     - if you want to group an orders report by customer and then   
  744.     determine the average sized order for each customer, select the   
  745.     field that contains the order amount.  
  746.   
  747. 2.  Select Insert|Summary.   
  748.   
  749.     The Insert Summary dialog box appears.  
  750.   
  751. 3.  In the top scroll box, select the action you want to take on the   
  752.     grouped data.   
  753.   
  754.     For example:  
  755.   
  756.     - if you want to count the number of values in each group, select   
  757.     Count, or  
  758.     - if you want to average the values in each group, select Average.  
  759.   
  760. 4.  In the next scroll box, select the field that you want to trigger a   
  761.     grouping, whenever its value changes.   
  762.   
  763.     For example:  
  764.   
  765.     - if you want to group a customer list by state, select the state   
  766.     field, or   
  767.     - if you want to group an orders report by customer, select the   
  768.     field that contains the customer name or customer number.  
  769.   
  770. 5.  In the next scroll box select the sort direction (ascending = A to Z,   
  771.     0 to 9, descending = Z to A, 9 to 0).  
  772.   
  773. 6.  If you selected a date or Boolean field in the top scroll box, a   
  774.     third scroll box appears near the bottom of the dialog box. In this   
  775.     scroll box, select the date or Boolean condition that finalizes your   
  776.     summary specification.  
  777.   
  778. 7.  Select OK when finished. Crystal Reports sorts the data, and then groups   
  779.     and summarizes it to your specifications.   
  780.   
  781. 11.2.29  Grouping and Summarizing Using Nesting Groups  
  782.   
  783. 1.  Select the field you want to group.   
  784.   
  785.     For example:  
  786.   
  787.     - if you want to group and count a customer list by state and then,   
  788.     within each state group, group and count the list by city, select   
  789.     the field that contains the company name, or   
  790.     - if you want to group and sum an orders report by customer and   
  791.     then, within each customer group, group and sum the list by date,   
  792.     select the field that contains the order amount.  
  793.   
  794. 2.  Select Insert|Summary.   
  795.       
  796.     The Insert Summary dialog box appears.  
  797.   
  798. 3.  In the top scroll box, select the action you want to take on the grouped   
  799.     data.   
  800.   
  801.     For example:  
  802.   
  803.     - if you want to count the number of values in each group, select   
  804.     Count, or  
  805.     - if you want to average the values in each group, select Average.  
  806.   
  807. 4.  In the next scroll box, select the field that you want to trigger a   
  808.     grouping, whenever its value changes.   
  809.   
  810.     For example:  
  811.   
  812.     - if you want to group a customer list by state, select the state   
  813.     field, or   
  814.     - if you want to group an orders report by customer, select the   
  815.     field that contains the customer name or customer number.  
  816.   
  817. 5.  In the next scroll box select the sort direction (ascending = A to Z,   
  818.     0 to 9, descending = Z to A, 9 to 0).  
  819.   
  820. 6.  If you selected a date or Boolean field in the top scroll box, a third   
  821.     scroll box appears near the bottom of the dialog box. In this scroll box,   
  822.     select the date or Boolean condition that finalizes your summary   
  823.     specification.  
  824.   
  825. 7.  Select OK when finished. Crystal Reports groups and summarizes the data   
  826.     to your specifications.  
  827.   
  828. 8.  Select the same field you selected in Step 1.   
  829.   
  830. 9.  Select Insert|Summary.   
  831.   
  832.     The Insert Summary dialog box appears.  
  833.   
  834. 10. Select the action you want to take on the grouped data.  
  835.   
  836. 11. This time select the field you want to trigger the second group (the   
  837.     group within the group) whenever its value changes.   
  838.   
  839.     For example:  
  840.   
  841.     - if you want to group and count a customer list by state and then   
  842.     by city, select the city field, or   
  843.     - if you want to group and sum an orders report by customer and   
  844.     then by date, select the date field.  
  845.   
  846. 12. Select the sort direction (ascending = A to Z, 0 to 9, descending = Z   
  847.     to A, 9 to 0).  
  848.   
  849. 13. Select OK when finished. Crystal Reports groups and summarizes the data   
  850.     to your specifications.  
  851.   
  852. 14. Repeat Steps 8 to 14 for each additional group you want to set up.  
  853.   
  854. NOTE:  Group values (subtotals, summaries) and grand totals are   
  855. automatically formatted to match as closely as possible the formatting of   
  856. the field they are summarizing.  
  857.   
  858. 11.2.30  Creating Group Headers  
  859.   
  860. Just as Crystal Reports allows you to place a header at the top of each   
  861. page, it also allows you to place incremental headers above each group in   
  862. your report. This feature allows you to give your reports a polished,   
  863. professional appearance.  
  864.   
  865. Whenever you group your data, or insert a subtotal or a summary, Crystal   
  866. Reports creates two new sections on your report.   
  867.   
  868. o  One section, the Group Footer section, appears below the Details section.   
  869. This section holds the group value field itself.  
  870.   
  871. o  A matching section, the Group Header section appears above the Details   
  872. section. Anything you place in this section will appear as a header for your   
  873. group.   
  874.   
  875. NOTE:  Both sections are given the same designation so you can tell that   
  876. they are tied together. The two sections are also tied together visually.  
  877.   
  878. o  If you put text in the Group Header section, the same text will appear   
  879. as a header for each group on the report.  
  880.   
  881. o  If you put the field in the Group Header section that you use for the   
  882. sort and group by field, Crystal Reports will create a "live" header for   
  883. each group. For example, if you have a subtotal that groups your data by   
  884. Customer, putting a duplicate copy of the Customer field in the Group Header   
  885. section for that subtotal heads each group with the customer name. You can   
  886. then format this header field to make it stand out if you wish, using a   
  887. larger point size, bold face or italics, etc.  
  888.   
  889. NOTE:  You can hide either the Group Header section or the Group Footer   
  890. section for any group by activating the Hide Section option available via   
  891. the Format|Section command.  
  892.   
  893. 11.2.31  Multiple Groups for the Same Field  
  894.   
  895. When you set up a second group for the same field, Crystal Reports creates   
  896. a second group section on your report beneath the first group section.   
  897. Likewise, it creates a second Group Header section above the first Group   
  898. Header section. For each new group field section on an existing field,   
  899. Crystal Reports creates a pair of sections that effectively "bracket" the   
  900. existing sections. Each section is clearly marked so you can easily tell   
  901. which header section goes with each group section.  
  902.   
  903. If you place headers in each of the Group Header sections, you produce a   
  904. report that is extremely easy to read. For example, if you have grouped your   
  905. data by State and then by City within each state, each new State section will   
  906. be headed by a State header, and each City section within the State section   
  907. will be headed by a City header.  
  908.   
  909. 11.2.32  Sorting Your Data  
  910.   
  911. Crystal Reports allows you to sort your data by record and by group. This   
  912. section discusses each of the sorting procedures in depth.  
  913.   
  914. NOTE:  Crystal Reports sorts your data using the sorting rules appropriate   
  915. to the country that you have selected in the International dialog box in the   
  916. Windows Control Panel.  
  917.   
  918. 11.2.33  Sorting by Record  
  919.   
  920. Crystal Reports gives you the ability to sort your data on one or more sort   
  921. fields. Single and multiple field sorts will be covered in this section.  
  922.   
  923. Single field sorts are sorts in which all the data in the report is sorted   
  924. based on the values in a single field. Sorting an inventory report by stock   
  925. number and sorting a customer list by customer number are examples of single   
  926. field sorts.   
  927.   
  928. In a multiple field sort, Crystal Reports first sorts the entries   
  929. (alphabetic or numeric) in the first field selected, putting them in   
  930. ascending or descending order as specified. Then it sorts any entries in   
  931. the second field that can be sorted without disturbing the sort order of   
  932. entries in the first field. It then sorts any entries in the third field   
  933. that can be sorted without disturbing the sort order of the entries in the   
  934. first two fields. It follows the same pattern for sorting additional fields.  
  935.   
  936. Use the following procedure to sort by record:  
  937.   
  938. 1.  Select Print|Record Sort Order.   
  939.       
  940.     The Sort Order dialog box appears.  
  941.   
  942. 2.  Select the Sort Field(s) and Sort Direction you want and click OK   
  943.     when finished.   
  944.   
  945.     Crystal Reports sorts the records to your specifications.  
  946.   
  947. NOTE:  If you group your data using the Insert|Group, Insert|Subtotal,   
  948. or Insert|Summary command, Crystal Reports sorts your data automatically,   
  949. as part of the grouping process. For example, if you sort a customer   
  950. list by state, Crystal Reports first sorts the list alphabetically by state,   
  951. before breaking it into state groups. In such a case, you do not need to use   
  952. the Print|Record Sort Order command to generate the sorting.  
  953.   
  954. 11.2.34  Sorting Groups  
  955.   
  956. Crystal Reports allows you to change the order in which groups appear on   
  957. your report. You can:  
  958.   
  959. o  base the sort on any group (subtotal or summary) in your report, and  
  960. o  sort your report so that groups appear in ascending or descending order.  
  961.   
  962. When you group data, Crystal Reports first sorts the data by record and   
  963. then groups it according to your specifications. Here is some data typical   
  964. of that found in the {file.STATE} field of a customer list:  
  965.   
  966. In order to group the data by state, Crystal Reports sorts the original   
  967. data alphabetically by state, on the first pass, and then it breaks the   
  968. data into groups (whenever the value in the state field changes) on the   
  969. second pass. The resulting groups appear in ascending alphabetical order;   
  970. the group containing all the customers from Arizona comes before the group   
  971. containing all the customers from Colorado. Now this is fine if you want   
  972. the groups appearing in that order. But let's assume we want the data   
  973. grouped so that the group containing the most records (the state with the   
  974. most customers) appears first, then the state with the second highest   
  975. number of records, then the third, etc. Crystal Reports lets you do this   
  976. easily using the Print|Group Sort Order command.  
  977.   
  978. Use the following procedure to sort groups.  
  979.   
  980. 1.  Select the Print|Group Sort Order command.   
  981.   
  982.     The Sort Order dialog box appears, listing all the groups that you have   
  983.     set up in your report. In our example above, since customer data is   
  984.     grouped by state and the number of records in each state group is   
  985.     counted, a group name similar to this will appear in the Summary Fields   
  986.     box:  
  987.   
  988.     Group #n:customer.STATECount of customer.CUSTNAME  
  989.   
  990.     Translated, this means that the {customer.CUSTNAME} field (the field   
  991.     that contains the customer name) is grouped and counted every time the   
  992.     value in the {customer.STATE} field changes.  
  993.   
  994. 2.  Select this group, click the Add button.  
  995.   
  996.     Crystal Reports places it in the Sort Fields box and activates the Sort   
  997.     Direction options.  
  998.   
  999. 3.  Since you want the largest groups (by count) to appear first and the   
  1000.     smallest last, select Descending. If you wanted the smallest groups   
  1001.     to appear first, you would select Ascending.  
  1002.   
  1003. 4.  Click OK when finished.   
  1004.   
  1005.     Crystal Reports sorts the groups to your specifications.  
  1006.   
  1007. NOTE:  When you sort by group, nothing happens to the sort order of the   
  1008. records within a group; only the relative positions of the groups   
  1009. themselves change.  
  1010.   
  1011. 11.2.35  Hiding Parts of the Report when Printing   
  1012.   
  1013. Crystal Reports has four formatting commands that suppress (hide) various   
  1014. parts of a report. Each of these commands is discussed individually in   
  1015. Crystal Reports Help. The purpose of this section is to show the differences   
  1016. between the commands and how you can use them together to achieve   
  1017. sophisticated report formatting.  
  1018.   
  1019. The four commands are:  
  1020.   
  1021. Suppress if Duplicated  Suppress if Duplicated (Field format dialog box)   
  1022.             prevents a field value from printing if it is   
  1023.             identical to (a duplicate of) the value that comes   
  1024.             immediately before it. The value doesn't print but   
  1025.             the space in which it would have printed remains.  
  1026.   
  1027. Suppress if Zero        Suppress if Zero (Format Number/ Currency dialog   
  1028.             boxes) prevents a value from printing if it is a   
  1029.             zero value. The value doesn't print but the space   
  1030.             in which it would have printed remains.  
  1031.   
  1032. Suppress Blank Lines    Suppress Blank Lines (Format Section dialog box)   
  1033.             eliminates nonessential blank lines from your report.  
  1034.   
  1035. Hide when Printing      Hide when Printing (Field format dialog box) prevents   
  1036.             a field from printing. The field doesn't print but   
  1037.             the space allotted for the field remains.  
  1038.   
  1039. 11.2.36  Selecting Records and Groups to Include on Your Report  
  1040.   
  1041. You can include all records in your report, or you can restrict your   
  1042. report to specific records or groups of records. For example, you can   
  1043. print a sales report showing year to date sales for all sales reps in the   
  1044. country, or you can print a report that presents nationwide sales but only   
  1045. for the last month, or even a report that shows year to date sales but   
  1046. only for those sales reps in Texas and California. Your reports can be as   
  1047. inclusive or exclusive as you wish.  
  1048.   
  1049. Crystal Reports includes four commands on the Print menu for selecting   
  1050. records and groups.  
  1051.   
  1052.     -  Select Records  
  1053.     -  Select Groups  
  1054.     -  Edit Record Selection Formula  
  1055.     -  Edit Group Selection Formula  
  1056.   
  1057. o  Using the first two commands, Crystal Reports generates a selection   
  1058. formula for you automatically, based on your specifications.  
  1059.   
  1060. o  Using the last two commands, you create your own selection formula   
  1061. using the Formula Editor.  
  1062.   
  1063. 11.2.37 Generating a Selection Formula Automatically  
  1064.   
  1065. The Select Records and the Select Groups commands automatically generate   
  1066. record selection formulas based on your responses to dialog box questions.   
  1067. These commands require no knowledge of the Crystal Reports formula language.  
  1068.   
  1069. When you're using these commands, you select a field/group value and   
  1070. respond to questions about how you want to limit that field or group value.   
  1071. For example, if you want to prepare a report limited to Texas customers,   
  1072. you first click the state field in the customer database. Then, you select   
  1073. Print|Select Records (or choose Select Records from the right mouse button   
  1074. menu). When the Select Records dialog box appears you enter your selection   
  1075. criteria in the dialog box.   
  1076.   
  1077. Use the following procedure to have Crystal Reports generate your selection   
  1078. formula:  
  1079.   
  1080. 1.  Select the first field/group value you want Crystal Reports to use   
  1081.     for determining the records/groups to be included in the report.  
  1082.   
  1083. 2.  Select Print|Select Records or Print|Select Groups, whichever is   
  1084.     appropriate.   
  1085.   
  1086. NOTE:  Alternately, you can select a field or group value and click the   
  1087. right mouse button menu. Select Records appears on the right mouse button   
  1088. menu whenever a field is selected, and Select Groups appears on the right   
  1089. mouse button menu whenever a group value is selected.  
  1090.   
  1091. The Select Records or Select Groups dialog box appears, depending on your   
  1092. selection.   
  1093.   
  1094. 3.  Enter your selection criteria in the dialog box and click OK when   
  1095.     finished to return to the Report Editor.  
  1096.   
  1097. 4.  Repeat Steps 1-3 for each additional field/group value you want the   
  1098.     program to use for selecting records/groups.  
  1099.   
  1100.     Crystal Reports will generate a selection formula based on your   
  1101.     specifications and limit the report to the records or groups you have   
  1102.     specified.  
  1103.   
  1104. NOTE:  To view or edit the selection formula generated by Crystal Reports,   
  1105. select Print|Edit Record Selection Formula or Print|Edit Group Selection   
  1106. Formula, whichever is appropriate to your selection.  
  1107.   
  1108. 11.2.38  Creating a Selection Formula Manually  
  1109.   
  1110. The Edit Record Selection Formula and Edit Group Selection Formula commands   
  1111. take you to the Formula Editor so you can manually create your own   
  1112. selection formula. Both of these commands require some understanding of the   
  1113. Crystal Reports formula language.  
  1114.   
  1115. Using the Formula Editor, you can build a formula that restricts your   
  1116. report to the records or groups you specify. For example, to limit your   
  1117. report to those records with a customer number greater than 099999, you   
  1118. would build a record selection formula similar to this:  
  1119.   
  1120.     {file.CustNumb} >> "099999"  
  1121.   
  1122. To limit your report to those groups with a subtotal on the Amount column   
  1123. (triggered by changes in the CustNumb field) less than $10,000, you would   
  1124. build a group selection formula similar to this:  
  1125.   
  1126.     Sum({file.Amount},{file.CustNumb}) << $10000  
  1127.   
  1128. NOTE:  If you select:  
  1129.       
  1130.     Grouped by file.CustNumb  
  1131.     Sum of file.Amount  
  1132.   
  1133. (the group field of interest in this example) from the Field list, Crystal   
  1134. Reports automatically inserts everything into the formula with the exception   
  1135. of <<$10000.  
  1136.   
  1137. You can also restrict the records used in the report by date. For example,   
  1138. to restrict an invoice report to invoices from a specific month, May 1991   
  1139. in this case, you would build a record selection formula similar to this:  
  1140.   
  1141.     {file.Date}>>=Date(1991,05,01) and   
  1142.     {file.Date}<<Date(1991,06,01)  
  1143.   
  1144. or this:  
  1145.   
  1146.     {file.Date} in Date(1991,04,30) to Date(1991,06,01)  
  1147.       
  1148. or this:  
  1149.   
  1150.     Month({file.Date}) = 5  
  1151.   
  1152. You can make your selection formulas as simple or complex as you wish.   
  1153. You can use most of the functions and operators available for building any   
  1154. formula. Your only restrictions are:  
  1155.   
  1156. o  your record or group selection formula must be Boolean (i.e., it   
  1157. must return a Yes (True) or No (False) value). If you build a selection   
  1158. formula that isn't Boolean, you get a Formula Compiler Error that says,   
  1159. "The result of the selection formula must be a yes/no value."  
  1160.   
  1161. o  it cannot use the PageNumber, GroupNumber, or RecordNumber functions,   
  1162. and it cannot use a Subtotal, Grand Total, or Summary.  
  1163.   
  1164. 11.2.39  Selecting Date Ranges  
  1165.   
  1166. When you wish to select records based on a range of dates, you can use any   
  1167. of Crystal Reports' preset date ranges, or you can build a custom range to   
  1168. fit your needs. For a complete list of Crystal Report date ranges, please   
  1169. see Crystal Reports Help.  
  1170.   
  1171. 11.2.40  Generating Your Own Selection Formula  
  1172.   
  1173. 1.  Select Print|Edit Record Selection Formula or Print|Edit Group Selection   
  1174.     Formula.   
  1175.   
  1176.     The Formula Editor appears.  
  1177.   
  1178. 2.  Create your selection formula.  
  1179.   
  1180. 3.  Click Accept when you are finished.   
  1181.   
  1182.     Crystal Reports will limit your report to the records/groups specified.  
  1183.   
  1184. NOTE:  You will find a number of selection formula templates in the Help   
  1185. facility under Edit Record Selection Formula. These templates cover a wide   
  1186. range of typical record selection needs, and they can be pasted into the   
  1187. Formula Editor via the Windows clipboard. Once they're in the Formula Editor,   
  1188. you can change the formulas to fit your data.  
  1189.   
  1190. 11.2.41  Selecting Page Orientation and Paper Size  
  1191.   
  1192. You can use Crystal Reports with a variety of paper sizes and with portrait   
  1193. or landscape page orientation. You select paper sizes and page orientation   
  1194. via the Print Setup dialog box which appears when you select Print|Select   
  1195. Printer.  
  1196.   
  1197. Use the following procedure to select a new paper size/page orientation:  
  1198.   
  1199. o  To select a new paper size and/or page orientation, you select   
  1200. Print|Select Printer.  
  1201.   
  1202. o  When the Print Setup dialog box appears, you activate the printer you   
  1203. want to use if it is not already the default printer.  
  1204.   
  1205. o  You select your page orientation (Portrait or Landscape) in the   
  1206. Orientation box, and you select your paper size and source in the Paper   
  1207. box. Your choice of paper sizes depends on the capabilities of the printer   
  1208. you have selected, and the choice changes from printer to printer.   
  1209. For example, the HP LaserJet driver (PCL) offers a choice of letter, legal,   
  1210. executive or A4 paper sizes whereas the PostScript printer driver lets you   
  1211. choose from letter, letter small, legal, A4, A4 small, B5, and note paper   
  1212. sizes. When you make your selection and return to Crystal Reports, the paper   
  1213. you have selected is active.  
  1214.   
  1215.   
  1216. 11.3 Manipulating Text and Data  
  1217.   
  1218. This section outlines the various procedures to use for manipulating   
  1219. (copying, deleting, moving, etc.) text and data on your report.  
  1220.   
  1221. 11.3.1 Adding Text  
  1222.   
  1223. To add text, set the insertion point where you want the new text to begin,   
  1224. and type in your addition, or use a text field (Insert|Text Field command).  
  1225.   
  1226. 11.3.2 Copying Text  
  1227.   
  1228. Use the following procedure to copy text.  
  1229.   
  1230. 1.  Select the text you want to copy by dragging the I-beam cursor over the   
  1231.     text.  
  1232.   
  1233. 2.  Select Edit|Copy.   
  1234.   
  1235.     Crystal Reports moves a copy of the selected text to the Clipboard   
  1236.     without disturbing the highlighted text.  
  1237.   
  1238. 3.  Set the insertion point where you want to insert the copied text and   
  1239.     select Edit|Paste.   
  1240.   
  1241.     Crystal Reports copies the text at the selected point.  
  1242.   
  1243. NOTE:  You can also copy text to the Clipboard using the fifth button on   
  1244. the Button Bar. You can also paste text into your report from the clipboard   
  1245. using the sixth button on the Button Bar.  
  1246.   
  1247. 11.3.3 Deleting Text  
  1248.   
  1249. Use the following procedure to delete text.  
  1250.   
  1251. o  set the insertion point where you want to begin deleting, and press the   
  1252. Delete key enough times to delete the unneeded text, or  
  1253.   
  1254. o  select the text you want to delete by dragging the I-beam cursor over it,   
  1255. then:  
  1256.     - select Edit|Clear (or press Delete) to delete it permanently, or  
  1257.     - select Edit|Cut (or press Shift-Delete) to cut the text to the   
  1258.     clipboard for later use, or  
  1259.   
  1260. o  set the insertion point at the beginning of a line of text you want to   
  1261. delete and press Shift-End to select the entire line. Then:  
  1262.   
  1263.     - select Edit|Clear (or press Delete) to delete it permanently,  
  1264.     - or select Edit|Cut (or press Shift-Delete) to cut the text to   
  1265.     the clipboard for later use.  
  1266.   
  1267. 11.3.4 Editing Text  
  1268.   
  1269. Delete, edit, and/or add text as needed following the techniques described   
  1270. above.  
  1271.   
  1272. 11.3.5 Moving Text  
  1273.   
  1274. You can move text in Crystal Reports in two different ways:  
  1275.   
  1276. o  By pushing or pulling it to a new position using the Tab key.  
  1277. o  By cutting it to the clipboard and then pasting it in a new position.  
  1278.   
  1279. 11.3.6 Using the Tab Key  
  1280.   
  1281. Set the insertion point immediately in front of the text you want to move.  
  1282.   
  1283. o  Press the Tab key to move the text to the right. All text to the right   
  1284. of the insertion point moves each time you press the Tab key.  
  1285.   
  1286. o  Press the Backspace key to move the text to the left. All text to the   
  1287. right of the insertion point moves each time you press the Tab key.  
  1288.   
  1289. NOTE:  If you want to move several pieces of text on a given line into   
  1290. position (i.e., aligning titles with data fields), begin at the left. Move   
  1291. the leftmost text into position, reset the insertion point to the left of   
  1292. the second text element and move it into position, reset the insertion   
  1293. point to the left of the third text element, etc.  
  1294.   
  1295. 11.3.7 Using Cut and Paste  
  1296.   
  1297. 1.  Select the text you want to move.  
  1298.   
  1299. 2.  Select Edit|Cut.   
  1300.   
  1301.     Crystal Reports moves the text to the Clipboard.  
  1302.   
  1303. 3.  Set the insertion point to the new text position.  
  1304.   
  1305. 4.  Select Edit|Paste to paste the text at the new insertion point.  
  1306.   
  1307. 11.3.8  Moving Fields  
  1308.   
  1309. You move a database field by dragging it to a new position with the mouse,   
  1310. or by selecting it and using the Arrow keys.  
  1311.   
  1312. 11.3.9  Moving Fields with a Mouse  
  1313.   
  1314. 1.  Select the field you want to move.  
  1315.   
  1316.     o  To select a single field, click the field.  
  1317.   
  1318.     o  To select multiple fields, hold the Shift key down while you   
  1319.     click the fields. Handles appear on the selected field(s).  
  1320.   
  1321. 2.  With the cursor on the field (on one of the fields if you have selected   
  1322.     multiple fields) and the left mouse button depressed, move the field to   
  1323.     its new position.  
  1324.   
  1325. 3.  Release the mouse button when the field is in place.  
  1326.   
  1327. 11.3.10  Moving Fields with the Arrow keys  
  1328.   
  1329. 1.  Select the field you want to move.  
  1330.   
  1331.     o  To select a single field, click the field.  
  1332.     o  To select multiple fields, hold the Shift key down while you   
  1333.     click the fields.   
  1334.       
  1335.     Handles appear on the selected field(s).  
  1336.   
  1337. 2.  Use the Arrow keys to move the field to its new position.   
  1338.   
  1339. The field moves one grid position each time you press the Arrow key.  
  1340.   
  1341. NOTES:  a - Crystal Reports allows you to move fields across other fields   
  1342. without affecting the placement of the bottom fields.   
  1343.     b - You can move fields between sections with the following 
  1344.     exceptions:
  1345.     - grand totals cannot be moved outside the Grand Total section, and  
  1346.     - a subtotal or summary can be moved only within its initial   
  1347.     section or to the header portion of its initial section.  
  1348.   
  1349. 11.3.11  Deleting Fields  
  1350.   
  1351. You can delete a database field from your report by selecting it and:  
  1352.   
  1353. o  pressing the Delete key on the keyboard,   
  1354. o  selecting Delete Field from the right mouse button pop-up menu, or  
  1355. o  selecting Clear from the Edit menu.   
  1356.   
  1357. Each of these methods has the same effect: deleting the selected field. You   
  1358. may find one alternative to be more convenient at one time while a different   
  1359. alternative is more convenient at another.  
  1360.   
  1361.   
  1362. 11.4  Working with Graphics and Graphic Enhancements  
  1363.   
  1364. This section leads you through the following graphics-related topics:  
  1365.   
  1366. o  Bit-mapped graphics concepts,  
  1367. o  Inserting and moving graphics,  
  1368. o  Sizing and scaling graphics,  
  1369. o  Cropping graphics,  
  1370. o  Creating, moving, and formatting graphic lines  
  1371. o  Creating, moving, and formatting graphic boxes  
  1372. o  Using graphic boxes to highlight data  
  1373. o  Creating tables using graphic lines and boxes  
  1374. o  Graphic elements and the Status Bar  
  1375. o  Using the status bar when positioning a graphic element  
  1376.   
  1377. 11.4.1  Bit-mapped Graphics Concepts  
  1378.   
  1379. Bit-mapped graphics are the kind of graphics (pictures, logos, etc.) that   
  1380. are generally produced by paint programs and scanners. They are composed   
  1381. by the graphic designer as a pattern of tiny dots (pixels) on screen, and   
  1382. they are printed as a pattern of tiny dots on your report. Even though   
  1383. there are some limitations to what an individual can create with dots, a   
  1384. skilled graphics designer can nonetheless achieve some stunning effects   
  1385. that can add visual impact to your report.  
  1386.   
  1387. Crystal Reports allows you to use bit-mapped graphics in your reports   
  1388. from a wide variety of sources:  
  1389.   
  1390. o  scanners,  
  1391. o  paint programs,  
  1392. o  video capture cards,  
  1393. o  screen capture programs,  
  1394. o  CompuServe,   
  1395. o  commercial graphics developers, and  
  1396. o  shareware and public domain graphics suppliers.  
  1397.   
  1398. As long as the graphic is stored in one of the popular graphics formats   
  1399. that work with Crystal Reports, you can use it in your report.   
  1400.   
  1401.     - Most paint, scanner, screen capture, and video capture programs   
  1402.     can save graphics in one of the compatible file formats (.bmp,   
  1403.     .pcx, .gif, .tif, and .tga).  
  1404.   
  1405.     - Additionally, many programs (paint programs, graphics conversion   
  1406.     programs, screen capture programs, draw programs) will allow you to   
  1407.     import a graphic in a different format and save it in a format that   
  1408.     is compatible with Crystal Reports.   
  1409.   
  1410.     - There are, in fact, many low cost shareware programs or free   
  1411.     public domain programs that allow you to easily convert a bit-mapped   
  1412.     graphic stored in one format to another.   
  1413.   
  1414. Crystal Reports was designed for maximum graphics compatibility.  
  1415.   
  1416. NOTES:  a - When you select a graphic for inclusion in your report, Crystal   
  1417. Reports stores a copy of the graphic in the report file. Any changes you   
  1418. make to the graphic affect the copy; they do not alter the original.  
  1419.     b - When you click the right mouse button with the cursor over a 
  1420. graphic, a graphic options menu appears with the name and extension of the 
  1421. originating graphic file at the top. The file name is for information only 
  1422. since the graphic in your report is only a copy of the original. That copy is 
  1423. stored as part of the report and no longer has a separate file name. Any 
  1424. changes you make to the graphic affect the copy only; they do not alter the 
  1425. original.  
  1426.   
  1427. 11.4.2  Inserting, Moving, and Deleting Graphics  
  1428.   
  1429. Crystal Reports enables you to insert, move, and delete graphics with ease.  
  1430. You can insert graphics anywhere you want them to appear on your report.  
  1431.   
  1432. Use the following procedure to insert a graphic.  
  1433.   
  1434. 1.  Select Insert|Graphic (or click the Insert Graphic button on the   
  1435.     button bar).   
  1436.   
  1437.     The Choose Graphic File dialog box appears.   
  1438.   
  1439. 2.  Select the graphic you want to enter in your report, and click OK when   
  1440.     finished.   
  1441.   
  1442.     Crystal Reports returns you to the Report Editor, and an outline the   
  1443.     size of the graphic appears as an aid in placement.  
  1444.   
  1445. 3.  Position the outline where you want the graphic to appear and click the   
  1446.     left mouse button to place it.   
  1447.   
  1448.     Crystal Reports displays the graphic where you placed it.  
  1449.   
  1450. You can move a graphic in one of two ways:  
  1451. o  using the mouse  
  1452. o  using the dialog box  
  1453.   
  1454. Move a graphic with the mouse if you want to determine its final placement   
  1455. visually.  
  1456.   
  1457. o  To move a graphic using the mouse, click the graphic and, keeping the   
  1458. left mouse button depressed, drag the graphic to the place you want it.  
  1459.   
  1460. NOTES:  a - You can move the graphic within its current section, or move   
  1461. it to a new section if you wish. The position of the upper left hand corner   
  1462. of the graphic (not the position of the arrow) determines the section in   
  1463. which the graphic will appear.  
  1464.     b - Make sure you don't click the graphic on the handles. If you do, 
  1465. you will resize the graphic when you drag it.  
  1466.   
  1467. Move a graphic using the dialog box if you want the graphic to appear at   
  1468. an absolute position on your report.  
  1469.   
  1470. 1.  Select the graphic you want to move and select Format|Graphic to call   
  1471.     up the Graphic Format dialog box. (Alternately you can double click   
  1472.     the graphic to call up the dialog box or select the graphic and then   
  1473.     select Change Format from the right mouse button menu.)  
  1474.   
  1475. 2.  Click the Position button.  
  1476.   
  1477.     The Graphic Position dialog box appears. This dialog box indicates the   
  1478.     position of the graphic relative to the top left corner of its section.  
  1479.   
  1480.     o  To position the graphic even with the top left corner (the top   
  1481.     flush against the top of the section, the left side flush against   
  1482.     the left side of the section), enter the following settings:   
  1483.     Top 0.00, Left 0.00.  
  1484.   
  1485.     o  To move the graphic to the right, increase the Left setting. For   
  1486.     example, to move the graphic in two inches from the left edge of the   
  1487.     section, enter 2.00 for the Left setting (assuming you're working   
  1488.     in inches).  
  1489.   
  1490.     o  To move the graphic down in the section, increase the Top setting.   
  1491.     For example, to move the graphic down two inches from the top of   
  1492.     the section, enter 2.00 for the Top setting.  
  1493.   
  1494. NOTE:  Crystal Reports automatically resizes the section to accommodate   
  1495. the new graphic location.    
  1496.   
  1497. 3.  Click OK when finished to return to the Graphic Format dialog box, and   
  1498.     click OK once there to return to the Report Editor.   
  1499.   
  1500. Your graphic will be positioned according to your specifications.  
  1501. Crystal Reports makes it easy for you to delete a graphic from your report.  
  1502.   
  1503. Use the following procedure to delete a graphic.  
  1504.   
  1505. 1.  Select the graphic you want to delete.  
  1506.   
  1507. 2.  Select Edit|Clear, press the Delete key, or select Delete Graphic from   
  1508.     the right mouse button menu.   
  1509.   
  1510.  11.4.3  Sizing and Scaling Graphics  
  1511.   
  1512. Size and Scaling are two interrelated options that appear in the Graphic   
  1513. Format dialog box.    
  1514.   
  1515. o  Size refers to the absolute length and width of a graphic. If the original   
  1516. graphic is one inch wide, it has an absolute width of one inch. If you double   
  1517. the width of the graphic it has an absolute width of two inches.  
  1518.   
  1519. o  Scaling refers to the length and width of a graphic as a percentage of   
  1520. the original length and width. If the original graphic is one inch wide, it   
  1521. has a width scaling value of 100%. If you double the width of the graphic,   
  1522. it has a width scaling value of 200%.  
  1523.   
  1524. o  When you first place a graphic, Crystal Reports presents it in its   
  1525. original size (the size in which it was saved).  
  1526.   
  1527.     - When you change the size values in the Graphic Format dialog box,   
  1528.     Crystal Reports adapts the scaling values to the new height and/or   
  1529.     width.   
  1530.   
  1531.     - When you change the scaling values in that dialog box, the   
  1532.     program adapts the size values to the new height and/or width.  
  1533.   
  1534.     - When you resize the graphic using the mouse, the program adapts   
  1535.     the size values and the scaling values in the dialog box to the new   
  1536.     height and/or width.  
  1537.   
  1538. When you select a graphic for placement, Crystal Reports presents an   
  1539. outline that indicates the original size of the graphic (the size in which   
  1540. it was saved). When you place the outline, the graphic replaces the frame.   
  1541. You can then enlarge or reduce the size of the graphic to fit your needs.   
  1542.   
  1543. You have two options for doing this:  
  1544. o  using the mouse, and  
  1545. o  using the Format|Graphic command.  
  1546.   
  1547. You can expand or reduce the size of the graphic using a mouse via the   
  1548. sizing handles that appear on the sides and corners of the graphic when you   
  1549. select it. (To select a graphic, you click it with the left mouse button.)  
  1550.   
  1551. The sizing handles provide you a very straightforward means of resizing   
  1552. your graphic:  
  1553.   
  1554. o  The handles on the right and left sides of the graphic expand or reduce   
  1555. the width of the graphic without affecting the height. For example, if your   
  1556. graphic was a square initially, it becomes a rectangle with the top and   
  1557. bottom becoming longer than the sides (if expanded) or shorter than the   
  1558. sides (if reduced). This kind of sizing results in a graphic that has   
  1559. different proportions than the original.   
  1560.   
  1561. o  The handles on the top and bottom of the graphic expand or reduce the   
  1562. height of the graphic without affecting the width. For example, if your   
  1563. graphic was a square initially, it becomes a rectangle with the sides   
  1564. becoming longer than the top and bottom (if expanded) or shorter than the   
  1565. top and bottom (if reduced). This kind of sizing also results in a graphic   
  1566. that has different proportions than the original.   
  1567.   
  1568. o  The handles on the corners of the graphic expand or reduce the height   
  1569. and width of the graphic equally. If your graphic was originally a square,   
  1570. it remains a square even though it has been resized. This kind of sizing   
  1571. results in a graphic that retains the same proportions as the original.    
  1572.   
  1573. Use the following procedure to resize using a mouse.  
  1574.   
  1575. 1.  Click the graphic to select it. Handles appear on the sides and the   
  1576.     corners.  
  1577.   
  1578. 2.  Resize the graphic by dragging on the appropriate handle.  
  1579.   
  1580.     You can resize your graphic in two different ways using the Graphic   
  1581.     Format dialog box:  
  1582.     o  resizing a graphic to an absolute size, and  
  1583.     o  scaling a graphic to a percentage of its original size.  
  1584.   
  1585. Use the following procedure to resize a graphic to an absolute size.  
  1586.   
  1587. 1.  Click the graphic to select it and then select Format|Graphic to call   
  1588.     up the Graphic Format dialog box.   
  1589.   
  1590.     (Alternately you can double click the graphic to call up the dialog   
  1591.     box or select the graphic and then select Change Format from the right   
  1592.     mouse button menu.)  
  1593.   
  1594. 2.  Enter the new height and/or width in the Size box.  
  1595.   
  1596. 3.  Click OK when finished.   
  1597.   
  1598.     Crystal Reports resizes your graphic to your new specifications.  
  1599.   
  1600. Use the following procedure to resize a graphic as a percentage of its   
  1601. original size:  
  1602.   
  1603. 1.  Click the graphic to select it and then select Format|Graphic to call   
  1604.     up the Graphic Format dialog box.   
  1605.   
  1606.     (Alternately you can double click the graphic to call up the dialog box   
  1607.     or select the graphic and then select Change Format from the right mouse   
  1608.     button menu.)  
  1609.   
  1610. 2.  Enter the new scale value for the height and/or width in the Scaling box.  
  1611.   
  1612. 3.  Click OK when finished.   
  1613.   
  1614.     Crystal Reports resizes your graphic to your new specifications.  
  1615.   
  1616. NOTES:  a - When you change the Size values, the Scaling values won't   
  1617. change while the dialog box is open. Also, when you change the Scaling   
  1618. values, the Size values won't change while the dialog box is open. The   
  1619. changes will appear the next time you open the dialog box.  
  1620.     b - Crystal Reports automatically resizes the appropriate report 
  1621. section to accommodate the resized graphic.  
  1622.   
  1623. 11.4.4 Cropping Graphics  
  1624.   
  1625. Cropping refers to "cutting away" those portions of your graphic that you   
  1626. don't want to print. If, for example, when you scanned your company logo   
  1627. from a letterhead you also scanned in some extraneous material (company   
  1628. address, corporate officers, etc.), you will probably want to "sanitize"   
  1629. the logo before you use it. Using Crystal Reports cropping capability, you   
  1630. can easily cut away the extraneous material leaving only the logo to print.  
  1631.   
  1632. There are two ways to crop a graphic:  
  1633. o  using the mouse  
  1634. o  using the dialog box  
  1635.   
  1636. Using the mouse is the easiest way to crop a graphic. It doesn't require   
  1637. any guesswork and you see your results immediately on screen.  
  1638.   
  1639. You crop by dragging the resizing handles while depressing the Shift key.  
  1640.   
  1641. o  When you drag the top handle down, you cut off part of the top part of   
  1642. the graphic.  
  1643. o  When you drag the bottom handle up, you cut off part of the bottom part   
  1644. of the graphic.  
  1645. o  When you drag the right side handle to the left, you cut off part of the   
  1646. right side of the graphic.  
  1647. o  When you drag the left side handle to the right, you cut off part of the   
  1648. left side of the graphic.  
  1649. o  When you drag one of the corner handles into the graphic, you cut off   
  1650. part of two sides of the graphic at once (the top and a side, or the bottom   
  1651. and a side).  
  1652. o  When you drag any of the handles away from the graphic (dragging the top   
  1653. handle up, the left handle to the left, etc.) you expand the frame and put   
  1654. white space between the graphic and the frame.    
  1655.   
  1656. Use the following procedure to crop a graphic using the mouse.  
  1657.   
  1658. 1.  Select the graphic you want to crop.   
  1659.   
  1660.     Sizing handles appear on the graphic.  
  1661.   
  1662. 2.  With the Shift key depressed, crop your graphic by dragging the   
  1663.     appropriate sizing handle(s).  
  1664.   
  1665. 3.  When finished, release the Shift key, resize the graphic if needed,   
  1666.     and move the cropped graphic into place.  
  1667.   
  1668. NOTE:  Resizing a graphic does not undo the cropping. It simply resizes   
  1669. that portion of the graphic that remains after cropping.  
  1670.   
  1671. When you crop a graphic using the dialog box, you specify (in inches or   
  1672. centimeters) the piece of the graphic that Crystal Reports is to cut from   
  1673. the top, bottom, right, and/or left side.  
  1674.   
  1675. NOTE:  This method of cropping can be particularly useful if you want to   
  1676. take a specific sized piece off each side of your graphic. For example, if   
  1677. you want to cut exactly one inch off all four sides of your graphic, you   
  1678. can do it more quickly and accurately with the dialog box than the mouse.  
  1679.   
  1680. Use the following procedure to crop a graphic using the dialog box.  
  1681.   
  1682. 1.  Select the graphic you want to crop and select Format|Graphic to   
  1683.     call up the Graphic Format dialog box.   
  1684.   
  1685.     (Alternately you can double click the graphic to call up the dialog   
  1686.     box or select the graphic and then select Change Format from the right   
  1687.     mouse button menu.)  
  1688.   
  1689. 2.  In the Cropping box, enter the amount you want to crop from the Top,   
  1690.     Left, Bottom, and/or right sides of your graphic.   
  1691.   
  1692.     o  Enter positive numbers to cut parts off your graphic.   
  1693.     o  Enter negative numbers to expand the frame, leaving white   
  1694.     space between the frame and the graphic.  
  1695.   
  1696. NOTE:  All cropping settings apply to the size of the original graphic.   
  1697. If the graphic has been resized before cropping, make certain you use the   
  1698. Original Size settings as guidelines when entering your new cropping   
  1699. instructions. As a general rule, when you are going to crop and resize a   
  1700. graphic, crop the graphic first, and then resize it.   
  1701.   
  1702. 3.  Click OK when finished.   
  1703.   
  1704.     Crystal Reports returns you to the Report Editor with the Graphic   
  1705.     cropped to your specifications.  
  1706.   
  1707. NOTE:  While there are many options in the Graphic Format dialog box, to   
  1708. crop a graphic you only need to concern yourself with the cropping   
  1709. instructions. Crystal Reports automatically maintains the scale and   
  1710. adjusts the absolute size of the graphic so it will display and print to   
  1711. your specifications.  
  1712.   
  1713.     -  To restore a cropped graphic to its original size and shape,   
  1714.     change all of the Cropping of original settings to 0.00.   
  1715.   
  1716.     -  To restore a resized graphic to its original size and shape,   
  1717.     change both Scaling settings to 100%.  
  1718.   
  1719.     -  To restore a cropped and resized graphic to its original size   
  1720.     and shape, change both the cropping and the scaling settings as   
  1721.     described above.  
  1722.   
  1723. 11.4.5 Creating, Moving, and Formatting Lines  
  1724.   
  1725. Crystal Reports enables you to create freeform lines that you can use to   
  1726. highlight field data, blocks of data, or entire sections of your report.  
  1727.   
  1728. Use the following procedure to create a line.  
  1729.   
  1730. 1.  Click Insert|Line.   
  1731.   
  1732.     A pencil cursor appears.  
  1733.   
  1734. 2.  Set the tip of the cursor (the pointed end) where you want the line to   
  1735.     begin and drag the cursor horizontally or vertically with the left   
  1736.     mouse button depressed.   
  1737.   
  1738.     The line appears as you drag the cursor.   
  1739.   
  1740. 3.  Release the mouse button when the line is the length you want it.  
  1741.   
  1742. NOTE:  To format the line (set line style, width, and color), you use the   
  1743. Format|Line command.  
  1744.   
  1745. 11.4.6  Moving a Line  
  1746.   
  1747. You can move a graphic line using the mouse, or with the keyboard using the   
  1748. arrow keys.  
  1749.   
  1750. Use the following procedure to move a line using the mouse.  
  1751.   
  1752. 1.  Click the line to select it.  
  1753.   
  1754. NOTE:  When selecting a line or other graphic, the mouse cursor must be an   
  1755. Arrow. Make sure the cursor changes to an arrow before you attempt to   
  1756. select a line.  
  1757.   
  1758. 2.  Drag the line where you want it.   
  1759.   
  1760.     Make sure to keep the left mouse button depressed as you move it.  
  1761.   
  1762. 3.  Release the mouse button once your line is in position.  
  1763.   
  1764. Use the following procedure to move a line with the arrow keys.  
  1765.   
  1766. 1.  Click the line to select it.  
  1767.   
  1768. 2.  Use the arrow keys to move the line up, down, right, or left and   
  1769.     position it where you want it.  
  1770.   
  1771. NOTE:  Crystal Reports displays line coordinates in the Status Bar to help   
  1772. you adjust the size and position of a line. Using the status bar readings,   
  1773. you can easily place a line at a specific location on your report, or   
  1774. align two or more graphic elements with each other.  
  1775.   
  1776. 11.4.7 Formatting a Line  
  1777.   
  1778. Crystal Reports allows you to specify the style, width, and color for each   
  1779. graphic line you include in your report. You enter your line formatting   
  1780. specifications in the Line Format dialog box.  
  1781.   
  1782. Use the following procedure to format a graphic line.  
  1783.   
  1784. 1.  Select the line of interest and then select Format|Line. (Alternately,   
  1785.     you can double click the line or select Change Format from the right   
  1786.     mouse button menu.)   
  1787.   
  1788.     The Line Format dialog box appears.  
  1789.   
  1790. 2.  Enter your formatting instructions for the line.   
  1791.   
  1792. 3.  Click OK when finished.   
  1793.   
  1794.     Crystal Reports returns you to the Report Editor with the line formatted   
  1795.     to your specifications.  
  1796.   
  1797. 11.4.8  Resizing a Line  
  1798.   
  1799. Once you have created a line, you can adjust its length using either the   
  1800. mouse or the keyboard arrow keys.  
  1801.   
  1802. Use the following procedure to resize a line using the mouse.  
  1803.   
  1804. 1.  Select the line you wish to resize.  
  1805.   
  1806. 2.  Move the mouse so that the cursor is over one of the square sizing   
  1807.     handles at the endpoints of the line.  
  1808.   
  1809. NOTE:  When the mouse cursor is over one of the sizing handles, it changes   
  1810. to a double headed arrow (the Resizing cursor).  
  1811.   
  1812. 3.  Drag the handle until the line is the length you want.  
  1813.   
  1814. Use the following procedure to resize a line using the arrow keys.  
  1815.   
  1816. 1.  Using the mouse, select the line you want to resize.  
  1817.   
  1818. 2.  While holding down the Shift key, press:   
  1819.   
  1820.     o  the Right Arrow key to lengthen a horizontal line,  
  1821.     o  the Left Arrow key to shorten a horizontal line,  
  1822.     o  the Down arrow key to lengthen a vertical line, or  
  1823.     o  the Up arrow key to shorten a vertical line.  
  1824.   
  1825. 11.4.9  Creating, Moving, and Formatting Boxes   
  1826.   
  1827. Crystal Reports enables you to create free-form graphic boxes that you can   
  1828. use to highlight field data, blocks of data, or entire sections of your   
  1829. report.   
  1830.   
  1831. You can also use graphic boxes by themselves, as stand-alone graphic   
  1832. elements, to add visual interest to your report.  
  1833.   
  1834. Use the following procedure to create a box.  
  1835.   
  1836. 1.  Click Insert|Box. A pencil cursor appears.  
  1837.   
  1838. 2.  Set the tip of the cursor (the pointed end) where you want to anchor   
  1839.     one corner of the box and drag the cursor towards the opposite corner   
  1840.     with the left mouse button depressed.   
  1841.   
  1842.     The box appears as you drag the cursor.   
  1843.   
  1844. 3.  Release the mouse button when the box is the size you want it.  
  1845.   
  1846. NOTE:  To format the box (set line style and width, line color, etc.),   
  1847. you use the Format|Box command.  
  1848.   
  1849. 11.4.10 Moving a Box  
  1850.   
  1851. You can move a graphic box using the mouse, or with the keyboard arrow keys.  
  1852. Use the following procedure to move a box using the mouse.  
  1853.   
  1854. 1.  Click the box to select it.  
  1855.   
  1856. NOTE:  You can select a box only with an arrow cursor. Position the I-beam   
  1857. near the box edge until it changes to an arrow and then click the edge of   
  1858. the box (not the center) to select it.  
  1859.   
  1860. 2.  Drag the box where you want it.   
  1861.   
  1862.     Make sure to keep the left mouse button depressed as you move it.  
  1863.   
  1864. 3.  Release the mouse button once your box is in position.  
  1865.   
  1866. Use the following procedure to move a box with the arrow keys.  
  1867.   
  1868. 1.  Click the box to select it.  
  1869.   
  1870. 2.  Use the arrow keys on the keyboard to move the box up, down, right, or   
  1871.     left until it is in the position that you want.  
  1872.   
  1873. NOTE:  Crystal Reports displays box coordinates in the Status Bar to help   
  1874. you adjust the size and position of a graphic box. Using the status bar   
  1875. readings, you can easily place a box at a specific location on your report,   
  1876. or align two or more boxes with each other.  
  1877.   
  1878. 11.4.11  Formatting a Box  
  1879.   
  1880. Crystal Reports allows you to change:  
  1881.   
  1882. o  the box style (the kind of line that outlines the box: single solid   
  1883. line, single dashed line, etc.),   
  1884. o  the width (thickness) of the line that outlines the box, and  
  1885. o  the color of the line that outlines the box.  
  1886. o  Additionally, you can specify the fill for the box (whether the box   
  1887. is filled with a color or empty).   
  1888.   
  1889. You enter your box formatting specifications in the Box Format dialog box.  
  1890. Use the following procedure to format a box.  
  1891.   
  1892. 1.  Select the box of interest and then select Format|Box.   
  1893.   
  1894.     (Alternately, you can double click the box or select Change Format   
  1895.     from the right mouse button menu.)   
  1896.   
  1897.     The Box Format dialog box appears.  
  1898.   
  1899. 2.  Enter your formatting instructions for the box.   
  1900.   
  1901. 3.  Click OK when finished.   
  1902.   
  1903.     Crystal Reports returns you to the Report Editor with the box formatted   
  1904.     to your specifications.  
  1905.   
  1906. 11.4.12  Resizing a Box  
  1907.   
  1908. Once you have created a box, you can adjust its size using either the   
  1909. mouse or the keyboard arrow keys.  Use the following procedure to resize a  
  1910. box using the mouse.  
  1911.   
  1912. 1.  Select the box you wish to resize.  
  1913.   
  1914. 2.  Move the cursor over one of the square sizing handles.  
  1915.   
  1916. NOTE:  When the cursor is over one of the sizing handles, it changes to   
  1917. a double headed arrow (the resizing cursor).  
  1918.   
  1919. 3.  Drag the handle until the box is the size you want:  
  1920.     o  If you want to change the height of the box, drag the handle at   
  1921.     the top or the bottom.   
  1922.     o  If you want to change the width of the box, drag the handle at   
  1923.     the right or the left side.   
  1924.     o  If you want to change both the height and the width at the   
  1925.     same time, drag one of the handles at the corners of the box.  
  1926.   
  1927. Use the following procedure to resize a box using the arrow keys.  
  1928.   
  1929. 1.  Using the mouse, select the box you want to resize.  
  1930.   
  1931. 2.  While holding down the Shift key, press:   
  1932.   
  1933.     o  the Right Arrow key to make the box wider,  
  1934.     o  the Left Arrow key to make the box narrower,  
  1935.     o  the Down arrow key to make the box taller, or  
  1936.     o  the Up arrow key to make the box shorter.  
  1937.   
  1938.  
  1939.  
  1940.  
  1941.